import request from '@/utils/request'

// 查询列表
export function listWarn(query) {
  return request({
    url: '/userlocation/warn/list',
    method: 'get',
    params: query
  })
}

// 删除
export function delWarn(userId) {
  return request({
    url: '/userlocation/warn/' + userId,
    method: 'delete'
  })
}


//更新
export function updateWarn(data) {
  return request({
    url: '/userlocation/warn',
    method: 'put',
    data: data
  })
}

//按照地区统计警告信息
export function infoArea(query) {
  return request({
    url: '/userlocation/warn/area',
    method: 'get',
    params: query
  })
}

// 根据id获取详情
export function detailsInfo(userId) {
  return request({
    url: '/userlocation/warn/' + userId,
    method: 'get'
  })
}

//泄露风险类型统计
export function infoLeak(query) {
  return request({
    url: '/userlocation/warn/leak',
    method: 'get',
    params: query
  })
}